package com.example.fuxi.controller;


import com.example.fuxi.entity.Result;
import com.example.fuxi.entity.TUser;
import com.example.fuxi.service.ITUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yuyongli
 * @since 2022-12-31
 */
@RestController
@RequestMapping("/t-user")
public class TUserController {

    @Resource
    private ITUserService userService;

    // 查询数据 并相应到前端
    @GetMapping
    public Result getAll(){
        List<TUser> list = userService.list();
        return new Result(list);
    }
}

